package com.xinqing.test.LetCode;

import java.util.Arrays;

/**
 * @Author:CHQ
 * @Date:2021/7/20 16:18
 * @Description
 */
public class FindKthLargest {
    public static void main(String args[]) {

        int[] nums={1,5,2,4};
        int k=2;
        System.out.println(test(nums,k));

    }
    public static int test(int[] nums,int k){
        Arrays.sort(nums);
        return nums[nums.length-k];
    }
}
